#include<iostream>
#include<vector>
using namespace std;
void q_sort(vector<int>& arr,int l,int r)
{
    if(l >= r)
    {
        return;
    }
    int i = l;
    int j = r;
    int key = l;
    int x = arr[key];
    while(i < j)
    {
        while(arr[j] >= x&&i < j)
        {
            j--;
        }
        while(arr[i] <= x&&i < j)
        {
            i++;
        }
        
        swap(arr[i],arr[j]);
        
    }
    swap(arr[key],arr[j]);
    key = j;
    q_sort(arr,l,key);
    q_sort(arr,key + 1,r);

}
int main()
{
    int n;
    vector<int>arr;
    cin >> n;
    for(int i = 0;i < n;i++)
    {
        int tem = 0;
        cin >> tem;
        arr.push_back(tem);
    }
    q_sort(arr,0,n - 1);
    for(auto j : arr)
    {
        cout << j << ' ';
    }
    return 0;
}